#ifndef __NotesMFD_H
#define __NotesMFD_H

#include <string>
#include <vector>
using namespace std;

#define MODE_SELECTION 0
#define MODE_VIEW 1
#define MODE_AUTO 2

struct flist {
  int num_entries;
  int max_entries;
  WIN32_FIND_DATA *files;
};

class NotesMFD: public MFD {
public:
	NotesMFD (DWORD w, DWORD h, VESSEL *vessel);
	//~NotesMFD ();
	bool ConsumeKeyBuffered (DWORD key);
	bool ConsumeButton (int bt, int event);
	char *ButtonLabel (int bt);
	int  ButtonMenu (const MFDBUTTONMENU **menu) const;
	void Update (HDC hDC);
	static int MsgProc (UINT msg, UINT mfd, WPARAM wparam, LPARAM lparam);
	VESSEL* Ship;
	
private:
	void ShowList(HDC hDC);
	void ShowContent(HDC hDC);
	void ShowNoFiles(HDC hDC);
	void ShowLines(HDC hDC);
	void ShowShipHelpAuto(HDC hDC);
	void ReadFile(string path);
    char*  classname;
	bool IsLineBreak(int lineIndex);
	int GetMfdLinesCount();
};

#endif //!__NotesMFD_H